package pack0623;

public class Test01 {
    public static void main(String[] args) {
        USB usb=method();
        usb.open();
    }

    //匿名内部类
    public static USB method() {
        class Mouse implements USB {
            @Override
            public void open() {
                System.out.println("鼠标打开！");
            }
        }
        return new Mouse();
    }
}
